package com.gitee.l0km.beanfilter.annotations;

import static java.lang.annotation.RetentionPolicy.RUNTIME;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;

import com.gitee.l0km.beanfilter.core.CodecPhase;
import com.gitee.l0km.common.spring.core.annotation.AliasFor;

/**
 * 序列化阶段过滤器关联类型定义注解<br>
 * 用于指定返回类型的关联类型，参见 {@link AssociatedType}注解
 * @author guyadong
 *
 */
@Retention(RUNTIME)
@Target({ElementType.METHOD} )
@AssociatedType(phase = CodecPhase.SERIALIZATION)
public @interface AssociatedTypeOfSerialization {
	/**
	 * 关联类型
	 */
	@AliasFor(annotation = AssociatedType.class,attribute = "associatedTypes")
	Class<?>[] associatedTypes() default {};
	/**
	 * 关联类名，与{@link #associatedTypes()}作用相同，
	 * 以字符串形式提供类型，在有些场景可以减少模组耦合
	 */
	@AliasFor(annotation = AssociatedType.class,attribute = "associatedTypeNames")
	String[] associatedTypeNames() default {};

}
